package com.groupnections.client.Entities;

import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.groupnections.shared.Entity;

public class UpdateEntity {

	public UpdateEntity(Entity entity) {

		final EntitiesDatabaseServerCallsAsync databaseServerCalls = GWT
				.create(EntitiesDatabaseServerCalls.class);

		databaseServerCalls.saveEntity(entity, new AsyncCallback<Void>() {

			public void onSuccess(Void result) {

				new ListEntities();
			}

			public void onFailure(Throwable caught) {
				// Show the RPC error message to the user

			}

		});

	}

}
